<template>
	<el-table :data="tableData" border highlight-current-row @selection-change="selectionChange">
		<el-table-column type="selection" align="center"></el-table-column>
        <el-table-column type="index" label="序号" width="70" align="center"></el-table-column>
		<el-table-column property="loanCategory" label="借款类别" align="center"></el-table-column>
        <el-table-column property="levelOneSubjectName" label="一级科目" align="center"></el-table-column>
        <el-table-column  property="levelTwoSubjectName" label="二级科目" align="center"></el-table-column>
        <el-table-column property="levelThreeSubjectName" label="三级科目" align="center"></el-table-column>
        <el-table-column property="levelFourSubjectName" label="四级科目" align="center"></el-table-column>
        <el-table-column property="remark" label="备注" align="center"></el-table-column>
        <el-table-column property="state" label="状态" align="center">
            <template slot-scope="scope">
                <span v-if="scope.row.state == 1" style="color: green;">已启用</span>
                <span v-if="scope.row.state == 0" style="color: #f00;">已禁用</span>
            </template>
        </el-table-column>
        <el-table-column label="操作" align="center">
            <template slot-scope="scope">
                <el-button type="text" size="small" @click="view(scope.row.id)">查看</el-button>
                <el-button type="text" size="small" @click="update(scope.row.id)">修改</el-button>                                   
            </template>
        </el-table-column>
	</el-table>
</template>
<script>
export default {
	data() {
		return {
			tableData: []
		}
	},
	methods: {
		selectionChange(arr) {
			this.$store.commit('borrowCategoryStore/multipleSelection', arr);
		}
	}
}
</script>